Skip to content

Add shared WorkOS Vault test client#424

Closed
RhysSullivan wants to merge 1 commit intomainfrom
workos-vault-testing
Closed

Add shared WorkOS Vault test client#424
RhysSullivan wants to merge 1 commit intomainfrom
workos-vault-testing

Conversation

@RhysSullivan
Copy link
Copy Markdown
Owner

@RhysSullivan RhysSullivan commented Apr 28, 2026

Summary

  • add a shared @executor/plugin-workos-vault/testing export with an Effect-native in-memory Vault client
  • replace the plugin-local and cloud harness Vault fakes with the shared test client
  • include the testing subpath in the WorkOS Vault package build and publish exports
  • add an opt-in WorkOS dev Vault contract test using FastCheck-generated object names

Validation

  • bun run lint from the top of the stack
  • bun run --cwd packages/plugins/workos-vault typecheck
  • bun run --cwd apps/cloud typecheck
  • bunx vitest run src/sdk/secret-store.test.ts from packages/plugins/workos-vault
  • bunx vitest run src/mcp-session.e2e.node.test.ts --config vitest.node.config.ts from apps/cloud
  • bun run --cwd packages/plugins/workos-vault build
  • bunx vitest run src/sdk/workos-vault.contract.test.ts --reporter=verbose from packages/plugins/workos-vault to verify the contract test skips without the explicit flag
  • WORKOS_VAULT_CONTRACT_RUNS=10 op run --env-file=/home/rhys/executor/apps/cloud/.env.op -- bun run --cwd packages/plugins/workos-vault test:contract:workos-vault -- --reporter=verbose

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 28, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
executor-cloud 08a9f35 Apr 28 2026, 05:29 AM

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 28, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
executor-marketing 08a9f35 Commit Preview URL

Branch Preview URL
Apr 28 2026, 05:29 AM

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 28, 2026

Open in StackBlitz

@executor/sdk

npm i https://pkg.pr.new/RhysSullivan/executor/@executor/sdk@424

@executor/plugin-file-secrets

npm i https://pkg.pr.new/RhysSullivan/executor/@executor/plugin-file-secrets@424

@executor/plugin-google-discovery

npm i https://pkg.pr.new/RhysSullivan/executor/@executor/plugin-google-discovery@424

@executor/plugin-graphql

npm i https://pkg.pr.new/RhysSullivan/executor/@executor/plugin-graphql@424

@executor/plugin-keychain

npm i https://pkg.pr.new/RhysSullivan/executor/@executor/plugin-keychain@424

@executor/plugin-mcp

npm i https://pkg.pr.new/RhysSullivan/executor/@executor/plugin-mcp@424

@executor/plugin-oauth2

npm i https://pkg.pr.new/RhysSullivan/executor/@executor/plugin-oauth2@424

@executor/plugin-onepassword

npm i https://pkg.pr.new/RhysSullivan/executor/@executor/plugin-onepassword@424

@executor/plugin-openapi

npm i https://pkg.pr.new/RhysSullivan/executor/@executor/plugin-openapi@424

@executor/plugin-workos-vault

npm i https://pkg.pr.new/RhysSullivan/executor/@executor/plugin-workos-vault@424

executor

npm i https://pkg.pr.new/RhysSullivan/executor@424

commit: 08a9f35

@RhysSullivan RhysSullivan force-pushed the workos-vault-testing branch 3 times, most recently from e0a2a01 to 4aedf88 Compare April 28, 2026 05:23
@RhysSullivan RhysSullivan force-pushed the workos-vault-testing branch from 4aedf88 to 08a9f35 Compare April 28, 2026 05:26
Copy link
Copy Markdown
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@RhysSullivan RhysSullivan changed the title [codex] Add shared WorkOS Vault test client Add shared WorkOS Vault test client Apr 28, 2026
RhysSullivan added a commit that referenced this pull request May 4, 2026
Extract the in-memory `WorkOSVaultClient` previously inlined in
`apps/cloud/.../api-harness.ts` into a published subpath
`@executor-js/plugin-workos-vault/testing` so other apps and downstream
consumers can stand up vault-backed tests without copying the fake.

`makeTestWorkOSVaultClient` matches the current Effect-shaped client
surface (post v4 migration) and adds optional knobs for exercising
secret-store retry paths: `conflictOnNextSecretUpdate`,
`rejectNamesWithColon`, and `rejectReadNamesLongerThan`. Errors are
tagged (`TestWorkOSVaultNotFoundError`/`Conflict`/`InvalidRequest`) and
carry numeric `status` so the production `isStatusError` checks in
`secret-store.ts` route 404/409/400 through the same paths the real
SDK exercises.

Re-cut from #424 against current `main`; the `mcp.ts` and contract test
pieces from that PR are intentionally dropped (the audience-fallback
removal landed via #429 and the contract test is out of scope for this
extraction).
RhysSullivan added a commit that referenced this pull request May 4, 2026
* Add shared WorkOS Vault test client

Extract the in-memory `WorkOSVaultClient` previously inlined in
`apps/cloud/.../api-harness.ts` into a published subpath
`@executor-js/plugin-workos-vault/testing` so other apps and downstream
consumers can stand up vault-backed tests without copying the fake.

`makeTestWorkOSVaultClient` matches the current Effect-shaped client
surface (post v4 migration) and adds optional knobs for exercising
secret-store retry paths: `conflictOnNextSecretUpdate`,
`rejectNamesWithColon`, and `rejectReadNamesLongerThan`. Errors are
tagged (`TestWorkOSVaultNotFoundError`/`Conflict`/`InvalidRequest`) and
carry numeric `status` so the production `isStatusError` checks in
`secret-store.ts` route 404/409/400 through the same paths the real
SDK exercises.

Re-cut from #424 against current `main`; the `mcp.ts` and contract test
pieces from that PR are intentionally dropped (the audience-fallback
removal landed via #429 and the contract test is out of scope for this
extraction).

* fixup: rename WorkOSVaultSdk -> WorkOSVaultPromiseApi after #481
@RhysSullivan
Copy link
Copy Markdown
Owner Author

Superseded by #482, which re-cuts the still-valuable test client extraction against current main (post Effect v4 + spec-driven plugin loading). The mcp.ts audience-fallback removal here already shipped in #429 and is dropped from #482.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant